
	<div class="form-list">
		<?php admin_msg( $msg ); ?>
		<form name="list" action="<?php echo $form ?>" method="post">
				
		<div class="clear-all"></div>
		
		<table border="1" class="form-list-table">
			<tr>
				<th rowspan="2" width="50">TT</th>
				<th rowspan="2" class="title">Tên chủ đề</th>
				<th colspan="4" width="280">Tùy chọn</th>
			</tr>
			<tr>
				<th width="75">Trang chủ</th>
				<th width="75">Hiển thị</th>
				<th width="65">Sửa</th>
				<th width="65">Xóa</th>
			</tr>
			<?php 
			if ( $items ) {
				$k = 1;
				foreach ( $items as $item ) {
					$k++;
					$s =  ( $item['status'] == 1 ) ? 'checked="checked"' : '';
					$h =  ( $item['home'] == 1 ) ? 'checked="checked"' : '';
					
					echo '<tr>';
						echo '<td><input type="hidden" name="id_'.$k.'" value="'.$item['id'].'" /><input name="order_'.$k.'" value="'.$item['orders'].'" type="text" class="text text-numb2" /></td>';
						echo '<td class="title"><p class="cat-name">';
							for( $i=0; $i < (int)$item['lever']; $i++ ) 
                				echo '&mdash;&mdash;';
							echo ' '.$item['name'].'</p>';
							echo '<p class="cat-desc">'.$item['description'].'</p>';	
							if ( $item['link'] )
								echo '<p class="cat-desc">Liên kết : <a href="'.$item['link'].'">'.$item['link'].'</a></p>';						
						echo '</td>';
						echo '<td><input '.$h.' type="checkbox" name="home_'.$k.'" value="1" /></td>';
						echo '<td><input '.$s.' type="checkbox" name="status_'.$k.'" value="1" /></td>';
						echo '<td><a href="'.admin_link( $url_edit.$item['id'] ).'" class="edit"><img width="20" height="19" src="'.admin_img().'spacer.gif" alt="Sửa" /></a></td>';
						echo '<td><a onclick="return confirm_del();" href="'.admin_link( $url_del.$item['id'] ).'" class="del"><img width="20" height="20" src="'.admin_img().'spacer.gif" alt="Xóa" /></a></td>';
					echo '</tr>';
				}echo '<tr><td colspan="6" class="no-data"><input type="hidden" name="length" value="'.$k.'" />Tổng số <strong>'.($k - 1).'</strong> menu</td></tr>';				
			
			}else  echo '<tr><td colspan="6" class="no-data">Chưa có chủ đề nào được tạo</td></tr>';	
			?>								
		</table>
		
		<div class="box-right">
			<input type="submit" name="submit" value="Cập nhập" class="button" />
		</div>
		
		</form>
	</div>